<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>中国刊网-期刊内容</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link href="css/category.css" rel="stylesheet" type="text/css" />
<link href="css/content.css" rel="stylesheet" type="text/css" />

<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery.json-2.4.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	$.ajax({
		type : "get",
		url : "perPeriodical/perPeriodicalUpNext",
		data : "perPeriodical.perPeriodicalId="+$("#perPeriodicalId").val(),
		success : function(text){
			var obj = new Function("return" + text)();//得到后台获得的ID号
			if(obj[0] != 0 && obj[1] != 0) {
				$("#upPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[0]);
				$("#nextPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[1]);
			} else if(obj[0] == 0 && obj[1] != 0) {
				$("#nextPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[1]);
				$("#upPerPeriodical").css({color:"#898686"});
			} else if(obj[0] != 0 && obj[1] == 0) {
				$("#upPerPeriodical").attr("href", "perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=" + obj[0]);
				$("#nextPerPeriodical").css({color:"#898686"});
			} else if(obj[0] == 0 && obj[1] == 0) {
				$("#upPerPeriodical").css({color:"#898686"});
				$("#nextPerPeriodical").css({color:"#898686"});
				<%--$("div").remove(".yema");--%>
			}
		}
	});
});
</script>

</head>

<body style="margin-left:auto; margin-right:auto;">
<jsp:include page="top.jsp"></jsp:include>

<input type="hidden" id="perPeriodicalId" value="${ requestScope.perPeriodical.perPeriodicalId }" />
	
	<div class="new-content">
		<div class="ziye-daohang">所在位置：<a href="index.jsp" class="yema-color">首页</a>&nbsp;&gt;&nbsp;文章阅读</div>
		<div class="new-content-left">
			<div class="new-content-left-top">
				<div class="new-content-lef-tu"><img alt="期刊" src="${ requestScope.periodical.cover }" width="115px" height="150px" /></div>
				<div class="new-content-lef-wenzi">
					<span class="font1"><b>${ requestScope.periodical.name }</b></span><br />
					<span class="font">创建时间:${ requestScope.periodical.createDate }</span><br /> 
					<span class="font">出版周期:${ requestScope.periodical.cycle }</span><br />
					<span class="font">杂志类型:${ requestScope.periodical.category.name }</span><br />
					<span class="centent-left-back">
						<a href="subscribeB/addSubscribe?periodical.periodicalId=${ periodical.periodicalId }&perPeriodicalId=${ perPeriodical.perPeriodicalId }&value=2" class="back">
							<c:if test="${ value == 0 }">订阅</c:if>
							<c:if test="${ value == 1 }">已订阅</c:if>
						</a>
					</span>
					<%--<span class="centent-left-back"><a href="#" class="back">收藏</a></span> <br />--%>
				</div>
			</div>
			
			<div class="center-left-bian font2">
				<div class="new-centent-left-zhuban">
					<span class="span1"><b>主办单位：</b></span> 
					<span class="span2"><a href="#" class="bain">${ requestScope.periodical.hostUnit }</a></span>
				</div>

				<div class="new-centent-left-zhuban">
					<span class="span1"><b>主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编：</b></span> 
					<span class="span2"><a href="#" class="bain">${ requestScope.editorChief.realName }</a></span>
				</div>

				<div class="new-centent-left-zhuban">
					<span class="span1"><b>编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;辑：</b></span> 
					<span class="span2">
						<c:forEach items="${ requestScope.editors }" var="editors">
							<a href="#" class="bain">${ editors.editor }</a>
						</c:forEach>
					</span>
				</div>

				<div class="new-centent-left-zhuban">
					<span class="span1"><b>编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;委：</b></span> 
					<span class="span2">
						<c:forEach items="${ requestScope.editorCommits }" var="editorCommits">
							<a href="#" class="bain">${ editorCommits.editorCommit }</a> 
						</c:forEach>
					</span>
				</div>

				<div class="new-centent-left-zhuban">
					<span class="span1"><b>简&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;介：</b></span> 
					<span class="span3">${ requestScope.periodical.introduce }</span>
				</div>
				
				<div>
					<div class="new-guoqi"><b>过期期刊:</b></div>
					<div class="new-guoqi-lie">
						<ul>
							<c:forEach items="${ requestScope.perPeriodicals }" var="perPeriodical">
							<li><img src="images/pointer.jpg" />
								<a href="perPeriodical/perPeriodicalId?perPeriodical.perPeriodicalId=${ perPeriodical.perPeriodicalId }" class="yema-color">
									&nbsp;${ requestScope.periodical.name }&nbsp;-&nbsp;第${ perPeriodical.number }期
								</a>
							</li>
							</c:forEach>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div class="new-content-right">
			<div class="new-content-right-top"><span class="new-content-right-top-a"><b>目录</b></span></div>
			
			<c:forEach items="${ requestScope.perPeriodicalDetails }" var="perPeriodicalDetails">
			<div class="font3">
				<div class="font4"><b>${ perPeriodicalDetails.bname }</b></div>
				<div class="font5">
					<ul>
						<c:forEach items="${ perPeriodicalDetails.articals }" var="articals">
						<li><span class="artical"><img src="images/pointer.jpg" /> &nbsp;<a href="artical/articalDetialInfo?articalId=${ articals.articalId }">${ articals.title }</a></span><span class="l">${ articals.pubDate }</span></li>
						</c:forEach>
					</ul>
				</div>
			</div>
			</c:forEach>

			<div class="yema">
				<a id="upPerPeriodical" class="yema-color">&lt;&nbsp;上一期&nbsp;&nbsp;</a> 
				<a id="nextPerPeriodical" class="yema-color">&nbsp;&nbsp;下一期&nbsp;&gt;</a>
			</div>
		</div>
	</div>
	<div style="clear:both;"></div>
<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>
